﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Citrix.XaAdminMobile.ViewModel
{
    /// <summary>
    /// Used to display a special "add new item" entry to the bottom of the list of available
    /// XenApp servers on the settings page.
    /// </summary>
    class AddServerItemViewModel
    {
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="addServerCommand">The command to execute when tapping on this item.
        /// This command will display the add server view.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="addServerCommand"/>
        /// is null.</exception>
        public AddServerItemViewModel(ICommand addServerCommand)
        {
            if (null == addServerCommand)
            {
                throw new ArgumentNullException("addServerCommand");
            }

            this.AddServerCommand = addServerCommand;
        }

        /// <summary>
        /// The command to execute when the user taps on the add server item.
        /// </summary>
        public ICommand AddServerCommand
        {
            get;
            private set;
        }
    }
}
